<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />  
<meta http-equiv="expires" content="0" />
<link href="common.css" rev="stylesheet" rel="stylesheet" type="text/css" />
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="function.js" type="text/javascript"></script>
</head><body marginwidth="0" marginheight="0"><div class="lian_midle sb">
	<div class="kehu_fram">
		<div class="kehu_top">您好！<strong class="col_org">董盛德</strong></div>
	  	<div class="kehu_info">
	  		<div class="qianbao">
				<div class="qbao1 sb">
					<div class="ydbao">
						<div class="pb10"><span class="mr10 sb mt10"><img src="ydbao.gif" /></span>
							<input type="button" value="我要存款" class="btn15 sb mt10" onclick="gosavemoney();" />
							<div class="clear"></div>
						</div>
						<div class="clear"></div>
						<p>钱包余额：<strong class="col_org" id="ll_yd_balance">0.00</strong>&nbsp;元&nbsp;<span id="yd_message"></span></p>
					</div>
					<p class="pb10">使用范围：<span class="cdicon1">移动业务</span></p>
					<p class="pb15">支付类型：
						<span class="cdicon4">银联转账</span>
						<span class="cdicon5">连连钱包</span>
					</p>
					<div class="pb10">
					<input name="yd_check_id" type="checkbox" />当移动钱包少于：
					
						<select id="yd_money_package" style="display: inline-block; ">
							<option value="100">100元</option>
							<option value="200">200元</option>
							<option value="500">500元</option>
							<option value="1000">1000元</option>
							<option value="2000">2000元</option>
						</select>
					
					时提醒我！</div>
					<p>佣金余额：<strong class="col_org" id="ll_yd_commission">0.00</strong>元</p>
					</div>
					<div class="qbao2 sb">
					<div class="lianbao">
						<div class="pb10">
							<span class="mr10 sb mt10"><img src="lianbao.gif" /></span>
								<form action="#" method="post" id="llinnerForm" target="_blank">
									<input type="hidden" name="llnetllbalance" id="llnetllbalance" />
									<input type="button" value="在线存款" onclick="llpay();" class="btn15 sb mt10" />
								</form>
							<div class="clear"></div>
						</div>
						<div class="clear"></div>
						<p>钱包余额：<strong class="col_org" id="ll_ll_balance">0.00</strong>&nbsp;元&nbsp;<span id="ll_message"></span>
						<a id="trans_detail" href="http://yintong.com.cn/qrygw/query/userTransDetailQuery.htm?user_login=13798186422&traderno=201107151000001027&timestamp=20121005105031&sign=fO4C3ebNw%2FTuh06oa4xOtp93Dl9N3emcyQw1v2QMydVGmJrhN27lYRZDkArPvbyr2iNBaB9QlZiP%0AFuDdwim8mkVV2H4%2FHBPpMd7a8KqDeGwOaduYORCzPqtwT7CP3PI%2BcwTBu1nzSZde7KATgJyBHFX0%0A%2FIKvxIWc6QrDiueb8oE%3D" target="_blank"><font color="blue">账户明细</font></a></p>
						
						
						<p id="p_amt_balfrz" style="display:none">冻结金额：<strong class="col_org" id="amt_balfrz"></strong>&nbsp;元&nbsp;</p>
					</div>
					<p class="pb10">使用范围：
					<span class="cdicon2">手机数码</span>
					<span class="cdicon3">数字点卡等</span></p>
					<p class="pb15">支付类型：
						<span class="bank816_06">网上银行<img src="hot.gif"></span>
						
					</p>
					<div class="pb10">
					<input name="ll_check_id" type="checkbox">当连连钱包少于：
						
						 <select id="ll_money_package" style="display: inline-block; ">
						 	<option value="100">100元</option>
							<option value="200">200元</option>
							<option value="500">500元</option>
							<option value="1000">1000元</option>
							<option value="2000">2000元</option>
						</select>
						
					时提醒我！</div>
					
					
					<p><input type="checkbox" name="auto_check_id" id="auto_check_id">&nbsp;通过农行柜面、广东银联转账（深圳银联除外），直接把钱存入连连钱包</p>
					</div>
					<div class="clear"></div>
					<div class="btn713"><input type="button" class="btn20" value="确认保存" onclick="changeLoginLog();"></div>
				</div>
			   <div class="clear"></div>
			<div class="bd713">
			   <div class="p1">
				   您的联系电话：
	          			<input type="text" value="13888888888" readonly="readonly" class="put1 w140">
	          			&nbsp;&nbsp;邮政编码：
		         		<input type="text" value="" class="put1 w110" readonly="readonly">
	          		
	         </div>
	         <div class="clear"></div>
	         <div class="p1">
				   详细地址：
	          			<input type="text" readonly="readonly" value="    " class="put1 w366">
	          		
	         </div>
	          <div class="clear"></div>
	          
			<div class="p1">
			  
			   	上次登录：<span class="col_org" id="last_login_time">2012-10-03 22:45:38</span>&nbsp;&nbsp;离线时间：<strong id="off_line_hor" class="col_org">36</strong>小时<strong id="off_line_min" class="col_org">4</strong>分<strong id="off_line_sec" class="col_org">52</strong>秒
	     		 	&nbsp;&nbsp;本次登录时间：<strong id="on_line_hor" class="col_org">0</strong>小时<strong id="on_line_min" class="col_org">0</strong>分<strong id="on_line_sec" class="col_org">1</strong>秒
	          
	        </div>
	         <div class="clear"></div>
	        </div>
	 	</div>
		 <div class="kehu_bom"></div>
	    </div>
		<div class="clear"></div>
	  </div>


<div class="lian_right sb">
<div class="card">
<h3 class="card_top"></h3>
<div class="car_info">
<div class="photo"><img src="0200011.jpg" width="90" height="120"></div>
<p class="f14 lh23">客户经理：<strong class="red_dep">张飞</strong></p>
<p class="f14 lh23">手机：<strong class="col_org f14">13888888888</strong></p>
<p class="f14 lh23">
<input id="btnSubmit" type="button" class="daka" value="打卡签到" onclick="qianDao();">
</p>
</div>
<h3 class="card_bot"></h3>
</div>

<div class="banner1 answer">
<div class="a_word">欢迎您对连连公司提建议,<br>将为您解答各种疑问<br>
&nbsp;&nbsp;&nbsp;

<a class="daka mt10" href="#" target="_blank">我要提问</a>

</div>
</div>
<div class="card">
<h3 class="card_top"></h3>
<div class="contect_info">
<h3 class="contect">联系我们</h3>
<p class="lh713">
客服：13800200266<br>



邮 编：510110<br>

地址：广州市天河区天河路208号 粤海天河城大厦13楼</p>
</div>
<h3 class="card_bot"></h3>
</div>
</div>


<script type="text/javascript">

</script>

<!-- 遮罩层 -->
<div id="faqbg" class="downdiv"></div>

<!--确认信息 & 信息提交前的提示框 -->
<div id="faqdiv" style="display:none">
    <div id="faqContent">
    </div> 
    <div align="center">
    <input type="button" class="daka" value="确定" onclick="closeErrorWin();" id="errorWinBtn">
    </div>
</div>

<!-- 返回信息提示框 -->
<div class="pwd_error" id="faqdivaft" style="display:none;">
  <p class="pb10"></p>
  <div class="infow f14">
    <p class="dotp pb10 fontred" id="faqContentaft"></p>
       <p class="dotp pb20">如查您有什么疑问， <a class="blue">点击联系客服</a></p>
	<p class="pl50">
	   <input type="button" value="关闭" class="btn9" onclick="closeErrorWinSign();" id="errorWinBtnaft">
    </p>
  </div>
</div>

<!-- 返回信息提示框 -->
<div class="pwd_error" id="faqdivsign" style="display:none;">
  <p class="pb10"></p>
  <div class="infow f14">
    <p class="dotp pb10 fontred" id="faqContentsign"></p>
    <p class="dotp pb20">如查您有什么疑问，<a class="blue">点击联系客服</a></p>
	<p class="pl50">
	   <input type="button" value="关闭" class="btn9" onclick="closeErrorWinSign2();" id="errorWinBtnaft">
    </p>
  </div>
</div>
<script type="text/javascript">
$().ready(function(){
transDetailQuery();
	/**
	 * 从数据库读取上次登录时间，余额报警阀值等信息
	 */
	getTime();
	/**
	 * 查询银通账户(连连钱包)余额
	 */
	 getLLBalance();
	
	/**
	 * 查询代理钱包余额和佣金
	 */
	 if('flush' == ""){
		 queryAgentInfo();
	 }
});
function getTime(){
	var url ='/secure/sys/getLoginTime';
	$.post(url,{},function(json){

		if(json.mbalance){
			$('#yd_money_package option[value='+json.mbalance+']').attr('selected', 'selected');
		}
		if(json.llbalance){
			$('#ll_money_package option[value='+json.llbalance+']').attr('selected', 'selected');
		}
		if(json.llstate==1){
			$("input[name='ll_check_id']").attr("checked", true);   
		}else{
			$("input[name='ll_check_id']").attr("checked", false);   
		}
		if(json.ydstate==1){
			$("input[name='yd_check_id']").attr("checked", true);  
		} else {
			$("input[name='yd_check_id']").attr("checked", false); 
		}
		$('#last_login_time').text(json.lasttime);
		$('#off_line_hor').text(json.offhor);
		$('#off_line_min').text(json.offmin);
		$('#off_line_sec').text(json.offsec);
		$('#on_line_hor').text(json.onhor);
		$('#on_line_min').text(json.onmin);
		$('#on_line_sec').text(json.onsec);
		$("#hfRecharge",window.parent.document).attr("href",json.mobileUrl);
		$("#mobileMenu",window.parent.document).attr("href",json.mobileUrl);
		$("#mainMobileUrl",window.parent.document).attr("href",json.mobileUrl);
	},"json");
}


function getLLBalance(){
	var url ='/secure/sys/queryLLBalance';
	$.post(url,{},function(json){
		$('#ll_ll_balance').text(json.amt_balaval);
		var amt_balfrz = json.amt_balfrz;
		if(amt_balfrz!="0.00")
		{
			$('#amt_balfrz').text(amt_balfrz);
			$('#p_amt_balfrz').css("display","");
			$('#p_amt_balfrz').attr("title","冻结设备押金"+amt_balfrz+"元");
		}
		if(json.autoState==0){
			$("input[name='auto_check_id']").attr("checked", true);   
		}else{
			$("input[name='auto_check_id']").attr("checked", false);  
		}
	},"json");
}

function queryAgentInfo(){
	var url ='/secure/person/queryAgentInfo';
	$.post(url,{},function(json){
		if(json.returnCode == "10000000"){
			$('#ll_yd_balance').text(json.balance);
			$('#ll_yd_commission').text(json.commission);
		}
	},"json");
}

function getLoginfo(){

	var ydmoney = $('#ll_yd_balance').text();
	var llmoney = $('#ll_ll_balance').text();
	var yd = delChar(ydmoney,',');
	var ll = delChar(llmoney,',');
	var url ='/secure/sys/getLoginInfo';
	$.post(url,{},function(json){
		if(json.ydstate==1){
			if(Number(json.mbalance)>Number(yd)){
				$('#yd_message').text("余额不足");
			}
		}
		if(json.llstate==1){
			if(Number(json.llbalance)>Number(ll)){
				$('#ll_message').text("余额不足");
			}
		}
	},"json");
}

function changeLoginLog(){
	
	var url ='/secure/sys/updateLoginlog';
	var mbalance = "100";
	var llbalance = "100";
	var ydstate= 0;
	var llstate = 0;
	//yd
	var flag = $("input[name='yd_check_id']").attr("checked");
	if(flag===true){
		mbalance = $('#yd_money_package').val();
		ydstate= 1;
	//	$("#hfRecharge",window.parent.document).attr("href",json.mobileUrl);
		//$("#mobileMenu",window.parent.document).attr("href",json.mobileUrl);
	}
	
	//ll
	var llflag = $("input[name='ll_check_id']").attr("checked");
	if(llflag===true){
		llbalance = $('#ll_money_package').val();
		llstate = 1;
	}
	
	//auto
	var autostate;
	var autoflag = $("input[name='auto_check_id']").attr("checked");
	if(autoflag===true){
		autostate = 0;
	}else{
		autostate = 1;
	}
	
	$.post(url,{mbalance:mbalance,ydstate:ydstate,llbalance:llbalance,llstate:llstate,autostate:autostate},function(json){
		if(json.success)
		{
			alert("保存成功");
			$("#hfRecharge",window.parent.document).attr("href",json.mobileUrl);
			$("#mobileMenu",window.parent.document).attr("href",json.mobileUrl);
			$("#mainMobileUrl",window.parent.document).attr("href",json.mobileUrl);
		}else{
			alert("保存失败");
		}
	},"json");
		
}

function gosavemoney() {
    var llavSessionId="BDC3F14385F4826209993563FE704404";
    var value="100";
    if(value==null || value==''){
    value=100;
    }
	window.parent.document.skipForm.action='#' + 'ISPReq.do?belong=myLL&subMenuId=zj&url=silverTranEdit.do&subMenuNo=1&value='+value+'&llavSessionId='+llavSessionId;
	var resProCode = "920000";
	if(resProCode == '957100') {
		window.parent.document.skipForm.action='#' + 'ISPReq.do?belong=myLL&subMenuId=zj&url=ums/umsDepositEdit.do&subMenuNo=1&value='+value+'&llavSessionId='+llavSessionId;
	}
	window.parent.document.skipForm.submit();
}

function llpay()
{
	var balance = $('#ll_ll_balance').text();
	$("#llnetllbalance").val(balance);
	$("#llinnerForm").submit();
}

function ydpay()
{
	var balance = $('#ll_yd_balance').text();
	$("#ydnetydbalance").val(balance);
	$("#ydinnerForm").submit();
}

function qianDao(){
	$.ajax({
		url:"/secure/person/signInEdit",
		cache:false, 
		success:function (data) {
			errorWin(data,'1');
		}
	});	
}

function closeBtn(){
   closeErrorWin();
}

function signIndo(){
    var submitMoney = $('#submitMoney').val();
    var sellerNo = $('#sellerNo').val();
	if(sellerNo==""){
		$("#sellerNo").focus();
		return false;	
	}
	if(submitMoney==""){
		$("#submitMoney").focus();
		return false;	
	} 
    var url = "#"; 
    $.post(url,{submitMoney:submitMoney,sellerNo:sellerNo},function(json){
        if(json.success){
			errorWinSign("签到成功!");
        }else{
			errorWinaft(json.msg);
        }
    },"json");
}

//充值明细和收支明细查询,json返回的是iframe的url(调用的是银通的接口)
function transDetailQuery(){
var url = "/transfer/transDetailQuery"; 
    $.post(url,{},function(json){
    //$("#maindiv").attr("innerHTML","<iframe id='mainiframe' style='overflow-y:hidden;'  height='1200' width='100%'  height='545'  name='mainiframe' frameborder='0'  src='"+json.detailQueryurl+"'></iframe>");
 	var queryurl="http://yintong.com.cn/qrygw/query/userTransDetailQuery.htm"+json.detailQueryurl;
    $("#trans_detail").attr("href",queryurl);
  // window.open(json.detailQueryurl);
	//window.open() = json.detailQueryurl;
    },"json");
}

</script>
</body></html>